package ooExercise.ooday01;

import com.sun.xml.internal.bind.v2.util.QNameMap;

public class Car {
    String brand1;
    String color1;
    int price1;
    String name1;

    Car(String name1,String brand1,String color1,int price1){
        this.brand1=brand1;
        this.color1=color1;
        this.price1=price1;
        this.name1=name1;
    }
    void start1(){
        System.out.println(name1+"开着"+brand1+"的车,"+color1+"颜色的,价值为:"+price1+"个w的车子,在车库启动了");
    }
    void run1(){
        System.out.println(name1+"开着"+brand1+"的车,"+color1+"颜色的,价值为:"+price1+"个w的车子,在马路上跑了");
    }
    void stop1(){
        System.out.println(name1+"开着"+brand1+"的车,"+color1+"颜色的,价值为:"+price1+"个w的车子,在家门口停下来了");
    }




















    String brand;
    String color;
    double price;

    Car(){
    }
    Car(String brand,String color,double price){
        this.brand=brand;
        this.color=color;
        this.price=price;
    }
    void start(String name){
        System.out.println(name+"一个人开着"+brand+"的车子,"+color+"颜色的,价值为："+
                price+"块钱的车子，在美国首都启动起来了");
    }
    void run(String name){
        System.out.println(name+"一个人开着"+brand+"的车子,"+color+"颜色的，价值为："+
                price+"块钱的车子,在赛道上跑起来了");
    }
    void stop(String name){
        System.out.println(name+"一个人开着"+brand+"的车子,"+color+"颜色的,价值为："+
                price+"块钱的车子，在"+name+"家门口停下来了");
    }

}
